import 'package:flutter_ncsjqz_getx/http/dio_service.dart';
import 'package:flutter_ncsjqz_getx/model/base_entity.dart';
import 'package:flutter_ncsjqz_getx/model/my_relese_entity.dart';
import 'package:flutter_ncsjqz_getx/util/toast_util.dart';
import 'package:get/get.dart';

class HistoryReleaseLogic extends GetxController {
  List<MyReleseDataList>? myReleseDataList = [];
  getData() async{
    MyReleseEntity myReleseEntity = await DioService<MyReleseEntity>().userPage({"pageSize":10,"currPage":0});
    myReleseDataList  = myReleseEntity.data!.xList ?? [];
    update();
  }

  del(postId) async{
    BaseEntity baseEntity = await DioService<BaseEntity>().delPost({"postId":postId});
    if(baseEntity.code == 0) toast("删除成功");
    update();
  }
}
